1 REM ** XMAS DEMO **
2 REM BY BROOKS DEFOREST :: (C)1989 RUFUS PRO
3 REM ------------------------------------------
5 SCREEN 2:SCREEN 3:KEY OFF
9 FOR P=0 TO 15:PALETTE P,0:NEXT
10 DIM Z(4000):BLOAD "XSCENE.PIC":GET(0,0)-(159,199),Z:BLOAD "CANDLE.SPR"
15 OPEN "I",#1,"CANDLE.LOC"
20 DIM A(99):DIM B(99):DIM C(99):DIM D(99)
25 DIM E(99):DIM F(99):DIM G(99):DIM H(99)
30 DIM I(300):DIM J(300):DIM K(300):DIM L(300)
35 DIM M(2000)
40 FOR Z=1 TO 13
45 INPUT #1,A,B,C,D
50 IF Z=1 THEN GET(A,B)-(C,D),A
55 IF Z=2 THEN GET(A+1,B-1)-(C,D),B
56 IF Z=3 THEN GET(A+1,B-2)-(C,D),C
57 IF Z=4 THEN GET(A+1,B-3)-(C,D-1),D
58 IF Z=5 THEN GET(A,B-1)-(C,D),E
59 IF Z=6 THEN GET(A,B)-(C,D),F
60 IF Z=7 THEN GET(A,B)-(C,D),G
61 IF Z=8 THEN GET(A,B)-(C,D),H
62 IF Z=9 THEN GET(A,B)-(C,D),I
63 IF Z=10 THEN GET(A,B-2)-(C,D),J
64 IF Z=11 THEN GET(A,B-1)-(C,D),K
65 IF Z=12 THEN GET(A,B-2)-(C,D),L
66 IF Z=13 THEN GET(A,B)-(C+1,D),M
70 NEXT:CLOSE
75 CLS
80 FOR P=0 TO 15:PALETTE P,0:NEXT:BLOAD "SNOW.SCR"
81 PP=100:PALETTE 1,8:FOR P=0 TO PP:NEXT:PALETTE 1,3:FOR P=0 TO PP:NEXT:PALETTE 1,7:FOR P=0 TO PP:NEXT:PALETTE 1,15
83 COLOR 1:LOCATE 10,6:PRINT "RUFUS XMAS"
85 P=3:P2=2:Y=240
86 WHILE Y>170
90 PALETTE P,P2:A=FIX(RND*4):IF A=1 THEN P2=3 ELSE IF A=2 THEN P2=7 ELSE P2=15
91 Y=Y-.1:LINE(0,Y)-(159,Y),1,,15000-RND*30000:PALETTE P,0:P=P+1:IF P>15 THEN P=2
92 WEND
93 PP=100:PALETTE 1,11:FOR P=0 TO PP:NEXT:PALETTE 1,7:FOR P=0 TO PP:NEXT:PALETTE 1,3:FOR P=0 TO PP:NEXT:PALETTE 1,8
95 CLS:FOR P=0 TO 15:PALETTE P,0:NEXT:PALETTE 9,1:PALETTE 10,9:PALETTE 11,3:PALETTE 12,11:PALETTE 13,12:PALETTE 14,8:PALETTE 15,4:PUT(0,0),Z,PSET:GOSUB 700
96 LINE(0,199)-(159,175),1,BF:RANDOMIZE TIMER:LINE(0,175)-(159,180),9,BF
97 FOR A=0 TO 30 STEP 2:LINE(0,A)-(159,A),8,,RND*30000:NEXT:A=0:FOR X=0 TO 160 STEP 9:C=FIX(RND*13):C=C+1:IF C=8 THEN C=14
98 A=A+1:Y=15+10*SIN(A):CIRCLE(X,Y+8),8,C:PAINT(X,Y+8),C
99 NEXT:LINE(0,181)-(159,182),9,B,RND*30000
100 PUT(35,80),M,PSET
101 GOSUB 205:GOSUB 305:FOR P=1 TO 15:PALETTE P,P:NEXT
105 WHILE INKEY$<>CHR$(27):GOSUB 305:GOSUB 405
110 GOSUB 205
115 GOSUB 305
120 GOSUB 405
150 WEND:SCREEN 2:SCREEN 0:PRINT "Tandy DOS V2.2":NEW
200 REM ** CANDLE **
205 C1=FIX(RND*4):IF C1=0 THEN C1=4
210 C2=FIX(RND*4):IF C2=0 THEN C2=4
215 IF C1=1 THEN PUT(40,44),A,PSET ELSE IF C1=2 THEN PUT(40,44),B,PSET ELSE IF C1=3 THEN PUT(40,44),C,PSET ELSE PUT(40,44),D,PSET
220 IF C2=1 THEN PUT(99,44),A,PSET ELSE IF C2=2 THEN PUT(99,44),B,PSET ELSE IF C2=3 THEN PUT(99,44),C,PSET ELSE PUT(99,44),D,PSET
225 RETURN
300 REM ** FIRE **
305 F1=FIX(RND*4):IF F1=0 THEN F1=FIX(RND*4)
310 IF F1=1 THEN PUT(60,134),I,PSET ELSE IF F1=2 THEN PUT(60,134),J,PSET ELSE IF F1=3 THEN PUT(60,134),K,PSET ELSE PUT(60,134),L,PSET
315 RETURN
400 REM ** BOUNCING BALL **
405 IF ZX=1 THEN 425 ELSE BT=BT+1:IF BT<100+EX THEN RETURN
410 BT=0:ZX=1
411 EX=FIX(RND*100)
415 DR=FIX(RND*2.4):IF DR=0 THEN DR=2
416 B=1:Q=0
420 IF DR=2 THEN BX=145:BY=160:PUT(BX,BY),E:Q=1 ELSE BX=0:BY=160:PUT(BX,BY),E:Q=1
425 IF DR=2 THEN 450
430 GOSUB 305:IF Q=1 THEN PUT(BX,BY),E ELSE IF Q=2 THEN PUT(BX,BY),F ELSE IF Q=3 THEN PUT(BX,BY),G ELSE PUT(BX,BY),H
435 Q=Q+1:IF Q=5 THEN Q=1
440 B=B+.4:BX=BX+4:BY=145+10*SIN(B)
441 IF BX>142 THEN ZX=0:RETURN
445 IF Q=1 THEN PUT(BX,BY),E ELSE IF Q=2 THEN PUT(BX,BY),F ELSE IF Q=3 THEN PUT(BX,BY),G ELSE PUT(BX,BY),H
446 RETURN
450 GOSUB 305:IF Q=1 THEN PUT(BX,BY),E ELSE IF Q=2 THEN PUT(BX,BY),F ELSE IF Q=3 THEN PUT(BX,BY),G ELSE PUT(BX,BY),H
455 Q=Q-1:IF Q=0 THEN Q=4
460 B=B+.4:BX=BX-4:BY=145+10*SIN(B)
461 IF BX<3 THEN ZX=0:RETURN
465 IF Q=1 THEN PUT(BX,BY),E ELSE IF Q=2 THEN PUT(BX,BY),F ELSE IF Q=3 THEN PUT(BX,BY),G ELSE PUT(BX,BY),H
470 RETURN
700 REM * MERRY CHRISTMAS *
705 P=1:PP=0
710 WHILE PP<380
711 PP=PP+1
715 PALETTE P,P2:A=FIX(RND*4):IF A=1 THEN P2=11 ELSE IF A=2 THEN P2=7 ELSE P2=15
716 PALETTE P,0:P=P+1:IF P>8 THEN P=1
720 WEND
725 CLS:FOR P=1 TO 15:PALETTE P,0:NEXT:RETURN
